package com.skycong.hello77.activity.intent;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;

import com.skycong.hello77.R;


/**
 * 第二个页面
 * Created by Kiki on 2018/5/17.
 */

public class SecondPageActivity  extends Activity implements View.OnClickListener{
    public Button commit;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_layout);
        commit = (Button) findViewById(R.id.commit);
        commit.setOnClickListener(this);
    }

    /**
     * 被动时回传data,回传参数
     * @param v
     */

    @Override
    public void onClick(View v) {
        Intent data = new Intent();
        data.putExtra("data","哈哈哈哈");
        setResult(2,data);
        finish();//结束当前界面，返回上一个界面
    }
}
